Force libreaddir-rand to be a shared library
authorSimon McVittie <smcv@debian.org>
Thu, 31 Mar 2016 09:17:02 +0000 (10:17 +0100)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Thu, 31 Mar 2016 14:22:06 +0000 (14:22 +0000)
If installed-tests are disabled, it would normally be a static
(convenience) library, which isn't something we can LD_PRELOAD.

Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #232
Approved by: cgwalters

Makefile-tests.am

index 4241ddb65b12924614c06601a4a84ad91ed14328..6016d03ca42de3cb1953a89cad438b8038383ef9 100644 (file)
@@ -131,6 +131,9 @@ libreaddir_rand_la_SOURCES = tests/readdir-rand.c
 libreaddir_rand_la_CFLAGS = $(OT_INTERNAL_GIO_UNIX_CFLAGS)
 libreaddir_rand_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS)
 libreaddir_rand_la_LDFLAGS = -avoid-version
+if !ENABLE_INSTALLED_TESTS
+libreaddir_rand_la_LDFLAGS += -rpath $(abs_builddir)
+endif
 
 test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
        tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \